package ProgramLogic;
import java.io.Serializable;
import java.util.TreeSet;

public class MediaManager implements Serializable {
    static final long serialVersionUID = 1L;
    private TreeSet<Medium> mediaList;
    private static MediaManager instance = null;

    public MediaManager() {
	mediaList = new TreeSet<Medium>();
    }

    public static MediaManager getInstance() {
	if (instance == null) {
	    instance = new MediaManager();
	}
	return instance;
    }

    public TreeSet<Medium> getMediaList() {
	return mediaList;
    }

    public static void setInstance(MediaManager newinstance) {
	instance = newinstance;
    }

    public void addMedium(Medium medium) {
	mediaList.add(medium);
    }

    public void setMediaList(TreeSet<Medium> medialist) {
	this.mediaList = medialist;
    }
}
